package org.springblade.pm.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.pm.entity.PmWeeknoteEvaluate;
import org.springblade.pm.mapper.PmWeeknoteEvaluateMapper;
import org.springblade.pm.service.IPmWeeknoteEvaluateService;
import org.springframework.stereotype.Service;


@Service
@AllArgsConstructor
public class PmWeeknoteEvaluateImpl extends BaseServiceImpl<PmWeeknoteEvaluateMapper,PmWeeknoteEvaluate> implements IPmWeeknoteEvaluateService {

	PmWeeknoteEvaluateMapper pmWeeknoteEvaluateMapper;
	@Override
	public Integer insert(PmWeeknoteEvaluate weeknoteEvaluate) {

		return pmWeeknoteEvaluateMapper.insert(weeknoteEvaluate);

	}

	@Override
	public Integer updateByWeeknoteId(PmWeeknoteEvaluate weeknoteEvaluate) {
		UpdateWrapper<PmWeeknoteEvaluate> wrapper=new UpdateWrapper<>();
		wrapper.eq("weeknote_id",weeknoteEvaluate.getWeeknoteId());
		return pmWeeknoteEvaluateMapper.update(weeknoteEvaluate,wrapper);
	}
}
